﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:l="clr-namespace:WPFDBBrowser.DBTreeView">
    <!--<DataTemplate x:Key="templateDBEntity">
        <StackPanel Orientation="Horizontal">
            <Image x:Name="part_image" Source="{Binding Path=ImageSource}"></Image>
            <TextBlock x:Name="part_name" Text="{Binding Path=Name}" Margin="5, 0, 0, 0"></TextBlock>
        </StackPanel>
    </DataTemplate>-->
    <Style TargetType="TreeViewItem" x:Key="defaultTreeViewItemStyle">
        <Setter Property="IsSelected" Value="{Binding Path=IsSelected}"/>
        <Setter Property="IsExpanded" Value="{Binding Path=IsExpanded}"/>
    </Style>

    <HierarchicalDataTemplate x:Key="hierarchicalTreeViewItemTemplate" ItemsSource="{Binding Path=Items}" 
                              ItemContainerStyle="{StaticResource defaultTreeViewItemStyle}">
        <StackPanel Orientation="Horizontal">
            <Image x:Name="part_image" Source="{Binding Path=ImageSource}"></Image>
            <TextBlock x:Name="part_name" Text="{Binding Path=Name}" Margin="5, 0, 0, 0"></TextBlock>
        </StackPanel>
    </HierarchicalDataTemplate>
    <HierarchicalDataTemplate x:Key="treeViewItemTemplate">
        <StackPanel Orientation="Horizontal">
            <Image x:Name="part_image" Source="{Binding Path=ImageSource}"></Image>
            <TextBlock x:Name="part_name" Text="{Binding Path=Name}" Margin="5, 0, 0, 0"></TextBlock>
        </StackPanel>
    </HierarchicalDataTemplate>
    <HierarchicalDataTemplate x:Key="columnTreeViewItemTemplate">
        <StackPanel Orientation="Horizontal">
            <Image x:Name="part_image" Source="{Binding Path=ImageSource}"></Image>
            <TextBlock x:Name="part_name" Text="{Binding Path=Name}" Margin="5, 0, 0, 0"></TextBlock>
            <TextBlock x:Name="part_description" Text="{Binding Path=Description}" Margin="5, 0, 0, 0"></TextBlock>
        </StackPanel>
    </HierarchicalDataTemplate>
</ResourceDictionary>